.buttonContainer {
  display: inline-block;
}

.actionButton {
  display: inline-flex;
  gap: var(--spacing-2);
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: var(--spacing-2);
  overflow: hidden;
  font-size: var(--font-size-4);
  font-weight: 500;
  line-height: 1;
  color: var(--global-foreground);
  cursor: pointer;
  border: var(--border-width-base) solid transparent;
  border-radius: var(--border-radius-base);
  transition:
    background-color 0.3s var(--default-timing-function),
    width 0.3s var(--default-timing-function);
}

.actionButton:focus-visible {
  outline: 2px solid var(--primary-accent);
  outline-offset: 2px;
  box-shadow: 0px 0px 40px 5px var(--primary-overlay-40);
}

.isPending {
  width: auto;
  background-color: var(--overlay-10);
}

.isPending:hover {
  background-color: var(--overlay-20);
}

.default {
  background-color: var(--overlay-5);
}

.default:hover {
  background-color: var(--overlay-10);
}

.canSend {
  background-color: var(--primary-overlay-40);
}

.canSend:hover {
  background-color: var(--primary-accent);
}

.actionButton:disabled {
  cursor: not-allowed;
  background-color: var(--overlay-5);
  opacity: 0.7;
}

.actionButton:disabled:hover {
  background-color: var(--overlay-5);
}

.iconWrapper {
  position: relative;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.sendIcon,
.cancelIcon {
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  transition: opacity 0.3s var(--default-timing-function);
}

.sendIcon {
  color: var(--overlay-50);
}

.default:hover .sendIcon {
  color: var(--global-foreground);
}

.canSend .sendIcon {
  color: var(--primary-accent);
}

.canSend:hover .sendIcon {
  color: var(--button-primary-foreground);
}

.actionButton:disabled .sendIcon {
  color: var(--overlay-50);
}

.actionButton:disabled:hover .sendIcon {
  color: var(--global-foreground);
}

.sendIconHidden {
  opacity: 0;
}

.cancelIcon {
  color: var(--global-foreground);
  opacity: 1;
}

.cancelIconHidden {
  opacity: 0;
}

.text {
  font-size: var(--font-size-4);
  font-weight: 500;
  color: var(--global-foreground);
  white-space: nowrap;
}

.textHidden {
  display: none;
}
